 #ifndef DIAGRAMITEM_H
 #define DIAGRAMITEM_H

 #include <QGraphicsPixmapItem>
 #include <QList>
//#include <sbml/SBMLTypes.h>

 class QPixmap;
 class QGraphicsItem;
 class QGraphicsScene;
 class QTextEdit;
 class QGraphicsSceneMouseEvent;
 class QMenu;
 class QGraphicsSceneContextMenuEvent;
 class QPainter;
 class QStyleOptionGraphicsItem;
 class QWidget;
 class QPolygonF;

 class Edge;

 class DiagramItem : public QGraphicsPolygonItem
 {
 public:
	
        enum DiagramType { protein, domain, Small, DNA, sourceSink, Dot, Complex, Trans, Invisible};

	Edge *host;
	QVector<Edge*> edges;
	double per;
	QPolygonF myPolygon;
	QString myId;
	bool filtered;
	int width, height;
	//QString notes;  // for next version

	DiagramItem(DiagramType diagramType, QGraphicsItem *parent = 0, QGraphicsScene *scene = 0);
	void addEdge(Edge *arrow);
	QRectF outlineRect() const;
	int roundness(double size) const;
	void setText(const QString &text);
	void setWidthHeight(const int &w, const int & h);
	QString text() const;
	QRectF boundingRect() const;
	DiagramType diagramType() const
         { return myDiagramType; }
	void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
	void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent);
	void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent);
	void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent);
	void DiagramItem::paint(QPainter *painter,const QStyleOptionGraphicsItem *option,QWidget * /* widget */);
	QVariant itemChange(GraphicsItemChange change,const QVariant &value);
	QPainterPath shape() const;
        void sizeChange(const qreal &r1, const qreal &r2);
	QString returnEnum(const int &num);

 private:
		
	QString myText;
	DiagramType myDiagramType;		
	
 };

 #endif
